use crate::tree::t_fn::BlockType;
#[derive(Debug, Clone)]
pub struct ThreeAddrExp {
    pub result: String,
    pub op: String,
    pub left: String,
    pub right: String,
}

#[derive(Debug, Clone)]
pub enum Exp {
    //Jump(String), //condition Q: do we have nesting if? A:TODO
    ThreeAddrExp(ThreeAddrExp),
    Assign(String, String), //x=5
    SwitchInt(String), // switch (x) { 1: { ... }, 2: { ... } }
    Goto(BlockType,bool), //goto if/else/fn, has else
    RetPreReg(String), //return x
}